﻿Public Class ThueThuNhapCaNhanBUS
    Shared Function TinhThue(ByVal SoTien As Double, ByVal NguoiPhuThuoc As Integer, ByVal TienMienGiam As Double) As Double
        Dim TienChiuThue As Double = SoTien - 9000000 - (NguoiPhuThuoc * TienMienGiam)
        Dim ThueSuat As Double
        If TienChiuThue >= 0 And TienChiuThue <= 60000000 Then
            ThueSuat = 0.05
        ElseIf TienChiuThue > 60000000 And TienChiuThue <= 120000000 Then
            ThueSuat = 0.1
        ElseIf TienChiuThue > 120000000 And TienChiuThue <= 216000000 Then
            ThueSuat = 0.15
        ElseIf TienChiuThue > 216000000 And TienChiuThue <= 384000000 Then
            ThueSuat = 0.2
        ElseIf TienChiuThue > 384000000 And TienChiuThue <= 624000000 Then
            ThueSuat = 0.25
        ElseIf TienChiuThue > 624000000 And TienChiuThue <= 960000000 Then
            ThueSuat = 0.3
        ElseIf TienChiuThue > 960000000 Then
            ThueSuat = 0.35
        Else
            ThueSuat = 0
        End If
        Return TienChiuThue * ThueSuat
    End Function
End Class
